import {
    get,
    post
} from './request'
// import qs from 'qs'
import axios from 'axios'

export const ApiGetUserInfo = () => axios.all([get('/api/v1/user/info', {}), get('/api/v1/user/account', {})])
export const ApiGetUserAccount = () => get('/api/v1/user/account', {})
export const ApiGetUserOrders = () => get('/api/v1/user/orders', {})
export const ApiGetUserConsumptions = () => get('/api/v1/user/consumptions', {})
export const ApiGetToken = params => post('/api/v1/user/login', params)
export const ApiAddUser = params => post('/api/v1/user/register', params)
export const ApiCreateOrder = params => post('/api/v1/pay/alipay/order/create', params)
export const ApiGetOrderStatus = params => post('/api/v1/pay/alipay/order/status', params)
export const ApiSubmitInvCheck = params => post('/api/v1/invcheck/submit', params)
export const ApiGetInvCheckDetail = params => post('/api/v1/invcheck/detail', params)
export const ApiGetInvInfoAll = params => get('/api/v1/invoice/info/base/all', params)
export const ApiGetInvNum = params => get('/api/v1/invoice/info/base/all/num', params)
export const ApiDownloadImage = (url, config) => get(url, {}, config)
export const ApiFeedback = params => post('/api/v1/deskapp/feedback', params)
export const ApiDeleteInvList = params => post('/api/v1/invoice/info/del/all', params)

export const InvInfoUploadUrl = import.meta.env.VITE_API_URL + "/api/v1/invoice/info/base";
export const InvFullUploadUrl = import.meta.env.VITE_API_URL + "/api/v1/invoice/info/full";
export const RenameDownloadUrl = import.meta.env.VITE_API_URL + "/api/v1/invoice/info/rename/download";